package composite

import "fmt"

type tSimpleCourse struct {
	iID int
	sName string
	fPrice float64
	mUser IUser
}


func NewSimpleCourse(id int, name string, price float64) ICourse {
	return &tSimpleCourse{
		id, name, price, nil,
	}
}

func (me *tSimpleCourse) ID() int {
	return me.iID
}

func (me *tSimpleCourse) Name() string {
	return me.sName
}

func (me *tSimpleCourse) Price() float64 {
	return me.fPrice
}

func (me *tSimpleCourse) SetUser(user IUser) {
	me.mUser = user
}

func (me *tSimpleCourse) Learn() LearningStates {
	fmt.Printf("%s is learning %s\n", me.mUser.Name(), me.sName)
	return DONE
}